package com.shop.czlmshop.controller;

import com.shop.czlmshop.pojo.Product;
import com.shop.czlmshop.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author: xmy
 * @Date: 2019-04-29 13:35
 * @Version 1.0
 */
@Controller
public class ActivityController {

    @Autowired
    private ActivityService activityService;

    @GetMapping("/selLbProduct")
    @ResponseBody
    public List<Product> selLbProduct(Model model){
        List<Product> products = activityService.selLbProduct();
        return products;
    }
}
